package com.me.myapplication;

import com.amap.api.maps.model.LatLng;

public class Points {
    private double lat;
    private double lng;

    public Points(String points){
        String [] coor = points.split(",");
        if(2 == coor.length){
            lat = Double.valueOf(coor[0]);
            lng = Double.valueOf(coor[1]);
        }
    }

    public double[] getCoor(){
        double[] coor = {lat, lng};
        return coor;
    }

    public double getLat() {
        return lat;
    }

    public double getLng() {
        return lng;
    }

    public LatLng toLatLng(){
        return new LatLng(lat, lng);
    }
}
